package com.jd.pet.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.jd.basic.domain.BaseDomain;
import com.jd.org.domain.Shop;
import com.jd.user.domain.User;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 实体类：
 */
@Data
public class Pet extends BaseDomain{

    private String name;
    private BigDecimal costprice;
    private BigDecimal saleprice;
    /**
     * 类型id
     */
    private Long typeId;
    private String resources;
    /**
     * 状态：0下架 1上架
     */
    private Integer state;
    private Date offsaletime; // 下架时间
    private Date onsaletime; // 上架时间
    private Date createtime = new Date();
    /**
     * 店铺Id 如果被领养店铺id为null
     */
    private Long shopId;
    /**
     * 如果被领养为领养用户id
     */
    private Long userId;
    private Long searchMasterMsgId;

    private PetType type; // 宠物类型
    private Shop shop; // 所属店铺
    private User user; // 领养用户
    private SearchMasterMsg searchMasterMsg; // 寻主标题
    // 级联框数据
    @JsonInclude(JsonInclude.Include.NON_EMPTY) // 没有数据就不显示
    private List<PetType> children = new ArrayList<>();
    /**
     * 添加宠物详情
     */
    private PetDetail petDetail;
//    private String intro;
//    private String adoptNotice;
}
